package com.banch.cloud.feign.service;

import com.banch.cloud.common.entity.Payment;
import com.banch.cloud.common.vo.CommonResult;
import feign.Param;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.*;

/**
 * 调用支付服务的接口
 *
 * @author banch
 * @version 1.0
 * @date 2020/7/9
 */
@FeignClient(value = "cloud-payment-service")
@Service
public interface PaymentFeignService {

    /**
     * getById
     *
     * @param
     * @return
     * @author banch
     * @date 2020/7/9
     * @throw
     **/
    @GetMapping(value = {"/payment/get/{id}"})
    CommonResult<Payment> getById(@PathVariable("id") Long id);


    /**
     * description
     *
     * @param
     * @return
     * @author banch
     * @date 2020/7/9
     * @throw
     **/
    @PostMapping(value = "/payment/timeout")
    String paymentTimeout(@RequestBody String ppp);

}